<template>
	<view>
		<view class="header">
			<view class="touxiangBox">
				<open-data type="userAvatarUrl" class="touxiangImg"></open-data>
			</view>
			<view class="header_right">

				<view class="nickNameBox" @click="changeLoagin">
					<open-data type="userNickName"></open-data>
				</view>
				<view class="header_bottom" v-if="loginStatus">
					<view class="yaoqingBut">
						<view class="yaoqingText">邀请码：{{initCode}} </view>
						<view class="maskBox"> </view>
					</view>
					
					<view class="yaoqingBut" style="margin-left: 2%;" @click="copyInitCode">
						<view class="yaoqingText">复 制</view>
						<view class="maskBox"> </view>
					</view>
				</view>
			</view>
		</view>
		<scroll-view scroll-y class="selfBox">
			<view class="cu-bar bg-white solid-bottom ">
				<view class="action">
					<text class="cuIcon-title text-orange "></text> 我的订单
				</view>
			</view>
			<view class="cu-list grid" :class="['col-' + gridCol,gridBorder?'':'no-border']">
				<view class="cu-item" v-for="(item,index) in cuIconList.order" :key="index" v-if="index<gridCol*2" @click="jump(item.type,index)">
					<view :class="['cuIcon-' + item.cuIcon,'text-' + item.color]" class="iconOder">
						<view class="brage-num animation-scale-up" v-if="item.badge!=0 && item.showS==true">
							{{item.badge>99?'99+':item.badge}}
						</view>
					</view>
					<text>{{item.name}}</text>
				</view>
			</view>

			<view class="cu-list menu">
				<view class="cu-item"  v-for="(item,index) in cuIconList.list" :class="item.url!=0?'arrow':''">
					<view class="content" hover-class="none" @click="changeTo(item.url,index)" v-if="item.hasDiscount>=0">
					
						<text class="text-grey " :class="'cuIcon-'+item.icon" :style="{color:item.color}" ></text>

						<text class="text-grey">{{item.title}} <text v-if="item.hasDiscount!=0 && item.showS==true" class="cuIcon-title" style="font-size: 4vw;color: red;"></text></text>
					</view>
				<view class="content" hover-class="none" @click="changeTo(item.url,index)" v-if="item.hasDiscount==-2">
					<text class="text-grey" :class="'cuIcon-'+item.icon" :style="{color:item.color}"></text>
					<text class="text-grey">{{item.title}}</text>
				</view>
					<button class="content kefu"  hover-class="none" v-if="item.hasDiscount==-1"  open-type="contact" bindcontact="handleContact">
						<text class="text-grey" :class="'cuIcon-'+item.icon" :style="{color:item.color}"></text>
						<text class="text-grey">{{item.title}}</text>
					</button>
				</view>

			</view>

		
		</scroll-view>
	</view>
</template>
<script src="./index.js"></script>
<style scoped>
	@import 'index.css';
</style>
